<?php if(!defined('OCTOMS')){header('HTTP/1.1 403');die('{"error":"forbidden"}');}
/*
 * @package       OctoMS.com
 * @subpackage    DesignJotter
 * @link          http://DesignJotter.com
 * @copyright     Copyright 2012, Valentino-Jivko Radosavlevici (http://valentino.radosavlevici.com)
 * @license       GPL v3.0 (http://www.gnu.org/licenses/gpl-3.0.txt)
 * 
 * Redistributions of files must retain the above copyright notice.
 * 
 * @since         OctoMS 0.0.1
 */
	
	/*
	 * Second function
	 * 
	 * @link http://octoms.com/doc/second
	 * 
	 * @package OctoMS
	 * @subpackage WP-OctoMS
	 * @version 0.1
	 * 
	 * @author Valentino-Jivko Radosavlevici
	 */
	class the_framework extends octoms
	{
		
		/**
		 * Class constructor
		 * 
		 * @author Valentino-Jivko Radosavlevici
		 */
		function __construct()
		{
			$this->_('the_framework',OMS_M,'model');
			
		}// end function __construct()
		
		/**
		 * About the framework
		 * 
		 * @author Valentino-Jivko Radosavlevici
		 */
		function about($page='designjotter')
		{
			if (in_array($page, array('designjotter','privacy')))
			{
				// Set the title
				switch ($page)
				{
					case 'designjotter':
						$this->template->title('About DesignJotter');
					case 'privacy':
						$this->template->title('DesignJotter Privacy Pollicy');
				}
				
				// Load the view
				$this->view->display('about/'.$page);
			}
			else 
			{
				// Redirect
				$this->template->_r('the_framework/designjotter');
			}
			
		}// end function about()
		
		/**
		 * Save the current installation content
		 * 
		 * @author Valentino-Jivko Radosavlevici
		 */
		function save_content()
		{
			// Set the title
			$this->template->title('Save content');
			
			// Save the current settings
			if($this->input->post('save'))
			{
				$this->model->save_content();
			}
			
			// Print the form
			$this->view->display(
				'save_content'
			);
			
		}// end function meh()
		
		/**
		 * Display the "Under the Hood"?
		 * 
		 * @author Valentino-Jivko Radosavlevici
		 */
		function advanced()
		{
			// Set the title
			$this->template->title('Advanced settings');
			
			// Get the local HTML helper
			$this->_('html',OMS_H);
			
			// Save the current settings
			if($this->input->post())
			{
				$this->model->advanced();
			}
			
			// Print the form
			$this->view->display('advanced');
			
		}// end function under_the_hood()
		
	}// end class other
	
	
/* End Of File <second.inc> */